import oAuth2Api from "@/api/declaration/oAuth2/oAuth2Api"
import httpRequest from "@/config/axios/httpRequest"
import { OAuth2ClientModel } from "@/models/auth/OAuth2ClientModel"




// 查询 OAuth2 客户端的列表
export const getOAuth2ClientPage = (params: PageParam) => {
  return httpRequest.get(oAuth2Api.GetOAuth2ClientPage, {params})
}

// 查询 OAuth2 客户端的详情
export const getOAuth2Client = (id: number) => {
  return httpRequest.get(oAuth2Api.GetOAuth2Client, {params: {id}})
}

// 新增 OAuth2 客户端
export const createOAuth2Client = (data: OAuth2ClientModel) => {
  return httpRequest.post(oAuth2Api.CreateOAuth2Client, data)
}

// 修改 OAuth2 客户端
export const updateOAuth2Client = (data: OAuth2ClientModel) => {
  return httpRequest.put(oAuth2Api.UpdateOAuth2Client, data)
}

// 删除 OAuth2
export const deleteOAuth2Client = (id: number) => {
  return httpRequest.delete(oAuth2Api.DeleteOAuth2Client, {params: {id}})
}
